<template>
  <CreatedQuestion :close="() => { router.push({ name: '题目管理' }) }" :getstart="asyncgetquestion" :ID="ID"
    :asynccreateorupdatequestion="asyncadmincreateorupdatequestion" :istype="true" :isrange="true"
    :teams="$store.getters.getteam" :userid="undefined" :isAdmin="type[$store.getters.getuser.type]">
  </CreatedQuestion>
</template>
<script setup lang="ts">
import CreatedQuestion from '../../../components/createdquestion/index.vue'
import {
  computed
} from "vue";
import {
  asyncadmincreateorupdatequestion,
  asyncgetquestion,
} from "../../../api/index";
import { useRoute, useRouter } from "vue-router";
const router = useRouter()
const route = useRoute()
const ID = computed(() => {
  return route.query.ID as unknown as number | undefined
})

const type: Record<'admin' | 'manage', 1 | 2> = {
  admin: 1,
  manage: 2
}

</script>

<style scoped>
.demo-ruleForm {
  padding-bottom: 10px;
  min-height: 55vh;
}

.row10 {
  height: 130px;
}

.el-icon-remove {
  cursor: pointer;
}

.width300 {
  width: 100px;
}

.icon {
  margin-right: 6px;
}

.icon-button {
  padding-left: 65px;
  padding-right: 65px;
  font-weight: bold;
  height: 48px;
}

.icon-button a {
  text-decoration: none;
  color: #fff;
}

.icon-class-var path {
  color: var(--el-button-text-color,
      --el-button-hover-color,
      --el-button-active-font-color);
  stroke: var(--el-button-text-color,
      --el-button-hover-color,
      --el-button-active-font-color);
  fill: var(--el-button-text-color,
      --el-button-hover-color,
      --el-button-active-font-color);
}
</style>

<style>
.row10 textarea {
  height: 130px;
}

.demo-ruleForm .el-form-item__label {
  color: #8c8c8c !important;
}
</style>